<template>
  <DataList :cate="cate" :cols="cols" :single="true" :name="name"/>
</template>
<script>
import DataList from "@/components/DataList";
import { getUser } from "@/utils/auth";
import { addXxhjsgk, deleteXxhjsgk, updateXxhjsgk, getXxhjsgk } from "@/api/信息化建设概况.js";
export default {
  components: {
    DataList
  },
  data() {
    return {
      cate: "A3-4-1信息化建设概况",
      name:'3.4.1 信息化建设概况',
      cols: [
        { label: "接入互联网出口总带宽(Mbps)", prop: "XYWCKZDK" },
        { label: "校园网主干最大带宽(Mbps)", prop: "XYWZGZDDK" },
        { label: "一卡通使用", prop: "XZ_YKT" },
        { label: "无线覆盖情况", prop: "XZ_WXFG" },
        { label: "网络信息点数(个)", prop: "WLXXDS" },
        { label: "管理信息系统数据总量(GB)", prop: "GLXXXTSJZL" },
        { label: "电子邮件系统用户数(个)", prop: "DZYJXTYHS" },
        { label: "上网课程数(门)", prop: "SWKCS" },
        
        { label: "数字资源量", prop: "信息化建设概况_数字资源量",
        data:[
          { label: "合计(GB)", prop: "SZZYL_HJ"},
          { label: "其中：电子图书(册)", prop: "SZZYL_QZDZTS"},
        ] },
        
      ]
    };
  },
  methods: {
   
    async fetchData() {
      var user = getUser();
      var datas = await getXxhjsgk(user.XXID,user.CJPC);
      return datas;
    },
    onadd(model){
      var temp = JSON.parse(JSON.stringify(model))
      return new Promise(async (resolve,reject)=>{
           
      
          console.log(JSON.stringify(temp));
          var model = await addXxhjsgk(temp);
          resolve(model);
      })
    },
    
    onupdate(model) {
      //
      var temp = JSON.parse(JSON.stringify(model))
      return new Promise(async (resolve,reject)=>{
           
          console.log(JSON.stringify(temp));
          var model = await updateXxhjsgk(temp);
          resolve(model);
      })
      //
    },
    ondelete(model) {
       var temp = JSON.parse(JSON.stringify(model))
      return new Promise(async (resolve,reject)=>{
        
         await deleteXxhjsgk(temp);
          resolve();
      })
    }
  }
};
</script>
<style>
</style>